//
//  Extension+UIlabel.swift
//  WLWeibo
//
//  Created by Devil on 16/8/14.
//  Copyright © 2016年 Wiliam. All rights reserved.
//

import UIKit

extension UILabel{

    convenience init(textColor: UIColor,textSize: CGFloat,maxWidth:CGFloat = 0){
    
        self.init()
        self.textColor = textColor
        self.font = UIFont.systemFontOfSize(textSize)
        
        if maxWidth > 0 {
            self.numberOfLines = 0
            
            self.preferredMaxLayoutWidth = maxWidth
        }
    
    }

}
